import {createRouter, createWebHashHistory} from 'vue-router'
import {routerBeforeEachConfig} from "../config/interceptor/router.ts";
import routes from "./routes.ts";

export const router = createRouter({
    history: createWebHashHistory(),
    routes,
    /**
     * 重新回到顶部
     */
    scrollBehavior: () => ({
        left: 0,
        top: 0
    })
})

router.beforeEach(routerBeforeEachConfig)

